package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.util.Date;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class FollowUserResponse {
    @ApiModelProperty(value = "列表数据", dataType = "FollowUserResponse.Content")
    private PageResponse2<Content> contentPage;

    @ApiModel("FollowUserResponse.Content")
    @Data
    @Builder
    public static class Content {
        @ApiModelProperty(value = "用户ID")
        private Integer userId;
        @ApiModelProperty("用户头像")
        private String userImg;
        @ApiModelProperty("用户名称")
        private String userName;
        @ApiModelProperty("职位")
        private String position;

        @ApiModelProperty(value = "企业ID")
        private Integer companyId;
        @ApiModelProperty(value = "企业名称")
        private String companyName;
        @ApiModelProperty(value = "中科公信:1存在")
        private Integer hasZkgx;
        @ApiModelProperty(value = "等级")
        private Integer companyLevel;

        @ApiModelProperty("类型：1直播 2红木圈 3视频 4上新")
        private Integer type;
        @ApiModelProperty(hidden = true)
        private Integer itemId;
        @ApiModelProperty("时间戳")
        private Date time;

        @ApiModelProperty(value = "直播数据", dataType = "FollowUserResponse.Live")
        private Live live;
        @ApiModelProperty(value = "红木圈数据", dataType = "FollowUserResponse.Dynamic")
        private Dynamic dynamic;
        @ApiModelProperty(value = "视频数据", dataType = "FollowUserResponse.Video")
        private Video video;
        @ApiModelProperty(value = "上新商品数据", dataType = "FollowUserResponse.Goods")
        private List<Goods> goods;
    }

    @ApiModel("FollowUserResponse.Live")
    @Data
    @Builder
    public static class Live {
        @ApiModelProperty("直播ID")
        private Integer roomId;
        @ApiModelProperty("直播图片")
        private String photo;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("状态")
        private String status;
    }

    @ApiModel("FollowUserResponse.Dynamic")
    @Data
    @Builder
    public static class Dynamic {
        @ApiModelProperty("动态id")
        private Integer dynamicId;
        @ApiModelProperty("类型:1文章 2动态")
        private Integer type;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("图片")
        private String photos;
    }

    @ApiModel("FollowUserResponse.Video")
    @Data
    @Builder
    public static class Video {
        @ApiModelProperty("视频ID")
        private Integer roomId;
        @ApiModelProperty("直播名称")
        private String name;
        @ApiModelProperty("封面")
        private String photo;
        @ApiModelProperty("视频地址")
        private String videoUrl;

        @ApiModelProperty("是否已关注用户:0无 1已关注")
        private Integer userCollectFlag;
        @ApiModelProperty("用户当前直播ID")
        private Integer userCurrentRoomId;
        @ApiModelProperty("用户ID")
        private Integer userId;
        @ApiModelProperty("名片ID")
        private Integer cardId;
        @ApiModelProperty("名片头像")
        private String cardImg;
        @ApiModelProperty("名片名称")
        private String cardName;

        @ApiModelProperty("观看数")
        private Long viewNum;
        @ApiModelProperty("点赞数")
        private Integer collectNum;
        @ApiModelProperty("是否已点赞：1已点赞")
        private Integer collectFlag;
        @ApiModelProperty("评论数")
        private Integer commentNum;
    }

    @ApiModel("FollowUserResponse.Goods")
    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty("商品ID")
        private Integer goodsId;
        @ApiModelProperty("商品主图")
        private String photo;
    }
}
